home *** CD-ROM | disk | FTP | other *** search
/ World of Education / World of Education.iso / world_d / drfinfo.zip / CMOS11.ZIP / CMOS.TXT < prev    next >
Text File  |  1991-09-18  |  4KB  |  154 lines

  1. CMOS.TXT
  2.  
  3. Purpose
  4. *******
  5.  
  6. 1. Naive users sometimes meddle with CMOS settings.  We need a
  7. fast way to put the scores of subtle CMOS configuration settings
  8. back the way they were.
  9.  
  10. 2. Power surges can corrupt CMOS.  We need a way for a naive
  11. user to quickly restore all the CMOS settings.
  12.  
  13. 3. If the battery fails, the contents will be lost.  We need a
  14. way to restore a known working CMOS configuration.
  15.  
  16.  
  17. Syntax
  18. ******
  19.  
  20. There are three utilities in the CMOS suite:
  21.  
  22. CMOSSAVE.COM  A:Myfile.Sav
  23. IF ERRORLEVEL 1 GO TO Trouble
  24.  
  25.         - saves a copy of CMOS in a file on hard disk or floppy.
  26.  
  27. CMOSREST.COM  A:MyFile.Sav
  28. IF ERRORLEVEL 1 GO TO Trouble
  29.  
  30.         - restores CMOS from a file on hard disk or floppy.
  31.  
  32. CMOSCHK.COM   A:MyFile.Sav
  33. IF ERRORLEVEL 1 GO TO FixIt
  34.  
  35.          - checks that CMOS has not been meddled with since the
  36.            last CMOSSAVE.  Compares CMOS with a file on hard disk
  37.            or floppy.
  38.  
  39. Hints on Use
  40. ************
  41.  
  42. Do a CMOSSAVE both to hard disk and to floppy.   The hard disk
  43. copy can be used for quick restores built into your AUTOEXEC.BAT
  44. file.
  45.  
  46. CMOSCHK.COM  C:\MyCMOS.Sav
  47. IF ERRORLEVEL 1 CMOSREST.COM  C:\MyCMOS.Sav
  48.  
  49. Sometimes CMOS will be so badly damaged the hard disk parameters
  50. will be corrupt and your hard disk will stop working.  In that
  51. case you will have to revert to using the floppy copy.
  52.  
  53. Wheneever you change your CMOS setting deliberately, you need to
  54. redo the CMOSSAV.COM.  However USE A NEW FILENAME, so that you
  55. can easily revert to the old version if your new settings do not
  56. pan out.
  57.  
  58. How it works
  59. ************
  60.  
  61. CMOSSAVE.COM simply copies the 128 byte contents of the CMOS
  62. bytes to a file.  CMOSREST.COM copies them back.  CMOSCHK
  63. compares them with the file contents.  If they are not equal it
  64. sets ERRORLEVEL 1.
  65.  
  66. CMOSREST does not touch bytes 0 to 0Fh and 32h because these are
  67. volatile -- they contain the date and time.  Similarly CMOSCHK,
  68. does not panic if any of these volatile bytes differ.  Hovever,
  69. CMOSSAVE saves all 128 bytes, so that you can browse the
  70. generated file with a hex editor to learn more about how CMOS
  71. works.
  72.  
  73. Because CMOSSave also saves the extended CMOS bytes, CMOSRest
  74. will restore the esoteric options like shadow RAM, wait states,
  75. processor clock speed, HMA enable etc.
  76.  
  77. These is no need to calculate checksums, since the checksum is
  78. saved and restored just like any other CMOS byte.
  79.  
  80. I have included a file called CHKMOS.BAT which can be inserted
  81. in your AUTOEXEC.BAT which uses all three utilities.
  82.  
  83.  
  84. How CMOS is used
  85. ****************
  86.  
  87. CMOS is battery backed RAM that stores configuration information
  88. when the power is off.  It is on my top ten worst ideas list of
  89. all time.  The problem is, CMOS is far too easily corrupted, by
  90. programs, power or meddling.
  91.  
  92. offset  purpose
  93.  00     seconds time of day
  94.  01     secords alarm
  95.  02     minutes time of day
  96.  03     minutes alarm
  97.  04     hours time of day
  98.  05     hours alarm
  99.  06     day of week
  100.  07     alarm day of month
  101.  08     month of year
  102.  09     year 1980=0
  103.  0A     status register A
  104.  0B     status register B alarm
  105.  0C     status register C flags
  106.  0D     status register D battery
  107.  0E     diagnostics status
  108.  0F     shutdown status
  109. !10*    diskette type
  110. !11*    reserved
  111. !12*    hard disk type
  112. !13*    reserved
  113. !14*    LSB equipment word
  114. !15*    LSB base RAM in K
  115. !16*    MSB base RAM in K
  116. !17*    LSB expansion RAM in K
  117. !18*    MSB expansion RAM in K
  118. !19*    fixed disk type C: extension
  119. !1A*    fixed disk type D: extension
  120. !1B*.2D reserved
  121. !2E*    MSB checksum
  122. !2F*    LSB checksum
  123. !30     LSB extended RAM in K above 1 MB
  124. !31     MSB extended RAM in K above 1 MB
  125.  32     BCD Century
  126. !33     128K info status byte
  127. !34..3F reserved
  128. !40..79 reserved for use by chipset maker
  129.  
  130. !       = must be restored
  131. *       = checksummed
  132.  
  133. Author
  134. ******
  135.  
  136. CMOSSAVE, CMOSREST and CMOSCHK are copyrighted but may be freely
  137. used for any purpose except military.  MASM source is available.
  138.  
  139. Please report bugs and problems to:
  140. Roedy Green
  141. Canadian Mind Products
  142. #168 - 1020 Mainland Street
  143. Vancouver BC Canada
  144. V6B 2T4
  145. (604) 684-6529
  146.  
  147. Electronic mail users can contact me on:
  148. BIX id ROEDY
  149. ENVOY id ROEDY
  150. Zoomit id GREEN ROEDY
  151.  
  152. Harvey Fishman wrote a pair of programs similar to CMOSSAVE and
  153. CMOSREST, but to the best of my knowledge, never released them.
  154.